<!-- 待办已办 -->
<template>
  <div class="content">
    <el-card class="box-card">
      <el-tabs v-model="activeName">
        <el-tab-pane label="待办事项" name="first">
          <el-table :data="todoList" style="width: 100%" height="200" :show-header="false" @cell-click="clickCell">
            <el-table-column prop="name" width="300"></el-table-column>
            <el-table-column prop="date" width="160"></el-table-column>
            <el-table-column prop="person"></el-table-column>
            <el-table-column prop="type"></el-table-column>
          </el-table>
        </el-tab-pane>
        <el-tab-pane label="已办事项" name="second">
          <el-table :data="doneList" style="width: 100%" height="200" :show-header="false" @cell-click="clickCell">
            <el-table-column prop="name" width="500"></el-table-column>
            <el-table-column prop="person"></el-table-column>
          </el-table>
        </el-tab-pane>
      </el-tabs>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      activeName: 'first',
      todoList: [
        {
          name: '计划变更-风光一体化防沙治沙-2022-08-31',
          date: '2023-08-30 11:40:00',
          person: '张XX',
          type: '防沙治沙'
        },{
          name: '计划变更-三北六期建设-2022-08-31',
          date: '2024-08-30 11:40:00',
          person: '朱冠',
          type: '三北六期'
        },{
          name: '计划变更-蚂蚁森林建设-2022-08-31',
          date: '2022-08-30 11:40:00',
          person: '朱XXX',
          type: '绿化建设'
        },{
          name: '计划变更-蓝旗机器人造林建设-2022-08-31',
          date: '2023-08-30 11:40:00',
          person: '朱XX',
          type: '造林'
        }
      ],
      doneList: [
        {
          name: '计划变更-风光一体化防沙治沙-2022-08-31',
          person: '张XX',
          type: '防沙治沙'
        },{
          name: '计划变更-三北六期建设-2022-08-31',
          person: '朱冠',
        },{
          name: '计划变更-蚂蚁森林建设-2022-08-31',
          person: '朱XXX',
        },{
          name: '计划变更-蓝旗机器人造林建设-2022-08-31',
          person: '朱XX',
        }
      ]
    }
  },
  methods: {
    clickCell() {
      const routeData = this.$router.resolve({path: '/manager/testImgShow', query: {type: 'todo'}})
      window.open(routeData.href,'_blank')
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
